Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add allow prerelease flag #2006

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

fatelei
Copy link

@fatelei fatelei commented Mar 23, 2024

No description provided.

@fatelei fatelei changed the title feat: add allow prerelease flag WIP: feat: add allow prerelease flag Mar 23, 2024
Copy link

netlify bot commented Mar 23, 2024

Deploy Preview for maturin-guide ready!

Name Link
🔨 Latest commit 400f0e7
🔍 Latest deploy log https://app.netlify.com/sites/maturin-guide/deploys/661679ee1a79340008f6768a
😎 Deploy Preview https://deploy-preview-2006--maturin-guide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@fatelei fatelei changed the title WIP: feat: add allow prerelease flag Draft: feat: add allow prerelease flag Mar 23, 2024
src/build_options.rs Outdated Show resolved Hide resolved
src/build_options.rs Outdated Show resolved Hide resolved
@fatelei fatelei force-pushed the issue-1975 branch 2 times, most recently from a6eb99a to 4dc3ce8 Compare March 25, 2024 05:56
src/build_options.rs Outdated Show resolved Hide resolved
src/build_options.rs Outdated Show resolved Hide resolved
@fatelei fatelei changed the title Draft: feat: add allow prerelease flag feat: add allow prerelease flag Apr 3, 2024
@fatelei fatelei force-pushed the issue-1975 branch 4 times, most recently from 58a5e61 to d5af13c Compare April 5, 2024 02:41
@messense messense self-requested a review April 10, 2024 01:33
src/build_options.rs Outdated Show resolved Hide resolved
@@ -587,6 +591,16 @@ impl BuildOptions {
self.find_interpreters(&bridge, &interpreter, &target, None, generate_import_lib)?
};

if !self.allow_prereleases {
interpreter.retain(|interp| {
let version = Version::new([interp.config.major as u64, interp.config.minor as u64]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't be enough, I think it also need patch version.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python 3.13.0a6 (main, Apr 10 2024, 01:20:43) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.version_info
sys.version_info(major=3, minor=13, micro=0, releaselevel='alpha', serial=6)
>>> sys.version
'3.13.0a6 (main, Apr 10 2024, 01:20:43) [GCC 12.2.0]'

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interp config only has major and minor, missing micro,we should pass minor to it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can modify interp config to add more detailed version info.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we can remove major and minor, add version: pep440_rs::Version instead to interpreter config and maybe other places. I might give it a try on the weekend.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants